import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useNavStore = defineStore(
  'my',
  () => {

  const deliveryPrice = ref(0)

  const getDeliveryPrice = () => {
    return deliveryPrice.value
  }
    return {
      getDeliveryPrice,
    }
  },
  {
    persist: {
      // 调整为兼容多端的API
      storage: {
        setItem(key, value) {
          uni.setStorageSync(key, value)
        },
        getItem(key) {
          return uni.getStorageSync(key)
        },
      },
    },
  },
)
